/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.isd.facturacion.modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author ctrosch
 */
@Embeddable
public class MovimientoFacturacionPK implements Serializable {

    @Basic(optional = false)
    @Column(name = "FCRMVH_MODFOR", nullable = false)
    private String modfor;

    @Basic(optional = false)
    @Column(name = "FCRMVH_CODFOR", nullable = false)
    private String codfor;
    
    @Basic(optional = false)
    @Column(name = "FCRMVH_NROFOR", nullable = false)
    private int nrofor;

    public MovimientoFacturacionPK() {
    }

    public MovimientoFacturacionPK(String modcom, String codcom, int nrofor) {
        this.modfor = modcom;
        this.codfor = codcom;
        this.nrofor = nrofor;
    }

    public int getNrofor() {
        return nrofor;
    }

    public void setNrofor(int nrofor) {
        this.nrofor = nrofor;
    }


    public String getCodfor() {
        return codfor;
    }

    public void setCodfor(String codfor) {
        this.codfor = codfor;
    }

    public String getModfor() {
        return modfor;
    }

    public void setModfor(String modfor) {
        this.modfor = modfor;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final MovimientoFacturacionPK other = (MovimientoFacturacionPK) obj;
        if ((this.modfor == null) ? (other.modfor != null) : !this.modfor.equals(other.modfor)) {
            return false;
        }
        if ((this.codfor == null) ? (other.codfor != null) : !this.codfor.equals(other.codfor)) {
            return false;
        }
        if (this.nrofor != other.nrofor) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 29 * hash + (this.modfor != null ? this.modfor.hashCode() : 0);
        hash = 29 * hash + (this.codfor != null ? this.codfor.hashCode() : 0);
        hash = 29 * hash + this.nrofor;
        return hash;
    }

    @Override
    public String toString() {
        return "MovimientoFacturacionPK{" + "modfor=" + modfor + "codfor=" + codfor + "nrofor=" + nrofor + '}';
    }
 
}
